\documentclass[10pt,a4paper]{article}
\usepackage{a4wide}
%\usepackage[top=2.5cm, bottom=2cm, left=1.5cm, right=1.5cm, a4paper]{geometry}

\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{array} 
\usepackage{tabularx}
\usepackage[spanish, activeacute]{babel}
\usepackage[small]{caption}
\usepackage{newclude}

% Carátula
\usepackage[txt]{caratula}
\materia{Organizaci\'on del Computador II}
\submateria{Segundo Cuatrimestre del 2011}
\titulo{Trabajo Pr\'actico N\'umero 2}
\subtitulo{Filtros de imagen}
\integrante{Celave, Martin}{530/08}{tolacelave@gmail.com}
\integrante{Colombo, Ricardo Gaston}{156/08}{ricardogcolombo@gmail.com}
\integrante{Lores, Fernando}{718/01}{ferlores@gmail.com}
\grupo{Lider espiritual: Angiulino "El chino" Cubrepileta}


%Macro para subscript fuera de modo matematico
\makeatletter
\newcommand\textsubscript[1]{\@textsubscript{\selectfont#1}}
\def\@textsubscript#1{{\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}}
\newcommand\textbothscript[2]{%
  \@textbothscript{\selectfont#1}{\selectfont#2}}
\def\@textbothscript#1#2{%
  {\m@th\ensuremath{%
    ^{\mbox{\fontsize\sf@size\z@#1}}%
    _{\mbox{\fontsize\sf@size\z@#2}}}}}
\def\@super{^}\def\@sub{_}

\catcode`^\active\catcode`_\active
\def\@super@sub#1_#2{\textbothscript{#1}{#2}}
\def\@sub@super#1^#2{\textbothscript{#2}{#1}}
\def\@@super#1{\@ifnextchar_{\@super@sub{#1}}{\textsuperscript{#1}}}
\def\@@sub#1{\@ifnextchar^{\@sub@super{#1}}{\textsubscript{#1}}}
\def^{\let\@next\relax\ifmmode\@super\else\let\@next\@@super\fi\@next}
\def_{\let\@next\relax\ifmmode\@sub\else\let\@next\@@sub\fi\@next}
\makeatother


% Macros para XMM
%\newcolumntype{C}{>{\footnotesize\centering\arraybackslash}X}
\newcolumntype{C}{>{\footnotesize\centering}p{18pt}}
\newcolumntype{D}{>{\footnotesize\centering}p{48.5pt}}
\newcommand{\xmmW}[2]{
\fontfamily{pcr}\selectfont	
\begin{center}
\begin{tabularx}{400pt}{@{}p{120pt}|C|C|C|C|C|C|C|C|@{}p{5pt}@{}}
\cline{2-9}
\footnotesize{#1} & #2 &\\
\cline{2-9}
\multicolumn{1}{r@{}}{^{\emph{\tiny 128}}} & \multicolumn{8}{c}{\textit{\scriptsize(word packed)}} & \multicolumn{1}{@{}l}{^{\emph{\tiny 0}}}\\
\end{tabularx}
\end{center}
}

\newcommand{\xmmD}[2]{
\fontfamily{pcr}\selectfont	
\begin{center}
\begin{tabularx}{400pt}{@{}p{120pt}|D|D|D|D|@{}p{5pt}@{}}
\cline{2-5}
\footnotesize{#1} & #2 &\\
\cline{2-5}
\multicolumn{1}{r@{}}{^{\emph{\tiny128}}} & \multicolumn{4}{c}{\textit{\scriptsize(double-word packed)}} & \multicolumn{1}{@{}l}{^{\emph{\tiny0}}}\\
\end{tabularx}
\end{center}
}

\newcommand{\ass}{\textit{assembler}}
\newcommand{\C}{\textbf{C}}

% Fancy Header
\usepackage{fancyhdr}
\fancyhf{}
\fancyfoot{}
\fancyhead{}
\lhead{\slshape \footnotesize{\leftmark}} % texto izquierda de la cabecera
\rhead{\Titulo} % número de página a la derecha
\rfoot{\thepage} 
\pagestyle{fancy}

% Algoritmos
\usepackage[section]{algorithm}
\usepackage{algorithmic}
\floatname{algorithm}{Algoritmo}
\algsetup{indent=2em}

\makeindex
\begin{document}

\maketitle
\tableofcontents
\clearpage

\include*{intro}
\include*{ciclo}
\include*{separarcanales}
\include*{monocromatizar}
\include*{umbralizar}
\include*{invertir}
\include*{normalizar}
\include*{suavizar}
\include*{mediciones}
\include*{conclusiones}
\include*{referencias}

\end{document}
